package com.heima.client.article.fallback;

import com.heima.client.article.IArticleClient;
import com.heima.model.common.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class ArticleClientFallback implements IArticleClient {
    /**
     * 保存或修改article文章信息
     *
     * @param articleDto
     * @return
     */
    @Override
    public ResponseResult syncArticle(ArticleDto articleDto) {
        log.warn("article微服务调用失败，开启降级处理....");
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }
}